<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>船期文件管理</title>
    <s:head/>
</head>
<script type="text/javascript">
    var formSetting = {
        title: "船期文件管理",
        module: 'query',
        columns: [{
            name: "shipCompany.id",
            label: "大船公司",
            type: "dropdown",
            dropdownType: "ajax",
            url: "../base/dropdown-shipCom",
            minLength: 1
        }, {
            name: "owner.id",
            label: "供应商",
            type: "dropdown",
            dropdownType: "ajax",
            url: "../base/dropdown-supCop",
            minLength: 0,
            colspan: 2
        }, {
            name: "CTIME",
            label: "上传日期从",
            type: "date"
        }, {
            name: "CTIME",
            label: "到",
            type: "date"
        }],
        buttons: {},
        grid: {
            id: "supShipMentMaterialsDataGrid",
            title: "查询结果",
            url: "shipMentMaterialQuery-findList",
            /* postData : {
             "pid" : pid
             }, */
            colModel: [{
                index: "ID",
                name: "ID",
                hidden: true
            }, {
                index: "SHIP_COM",
                name: "shipCompany.name",
                label: "大船公司"
            }, {
                index: "MATERIAL_ID",
                name: "MATERIAL_ID",
                label: "文件"
            }, {
                index: "dataSrc",
                name: "owner.name",
                label: "数据来源"
            }, {
                index: "CTIME",
                name: "CTIME",
                label: "上传时间",
                formatter: 'date',
                //sorttype:'date',
                //editrules:{date:true},
                //search:false,
                //editable:false,
                formatoptions: {srcformat: 'Y-m-d H:i:s', newformat: 'Y-m-d H:i:s'}
                //datefmt:'Y-m-d H:i:s'
            }/*, {
             index : "identifier",
             name : "identifier",
             label : "标识符"
             }, {
             index : "use_state",
             name : "use_state",
             label : "使用状态",
             formatter : function(cellvalue, options, rowObject) {
             if (cellvalue == "0") {
             return "启用";
             } else {
             return "禁用";
             }
             }
             }, {
             index : "updateUser",
             name : "updateUser",
             label : "修改人"
             }, {
             index : "updateDate",
             name : "updateDate",
             label : "修改时间"
             }  */],
            jsonReader: {
                root: "supShipMentMaterials"
            }
        }
    };
    $(document).ready(function () {
        $("#supShipMentMaterialsDataTable").mrdForm(formSetting);
    });
</script>
<body>
<div id="supShipMentMaterialsDataTable"></div>
</body>
</html>
